All Questions
2 questions
5votes
4answers
616views
Is there an easy way to do the equivalent of `sed ...` replacing the same line with multiple values?
I have a file where I want to replace some variables with data from a shell script. -A INPUT -i lo -s @LOCAL_IP@ -j ACCEPT Here I want to replace @LOCAL_IP@ with an IP address, I use the following: ....
1vote
1answer
3kviews
Problem with sed on a array containing strings containing spaces
I have a array looking like this: array=("(1 2 3) (123)" "2 31 (231)" "4 5 1 (451)" "(te)xt (1234)") This array is a example. It does not look like this but its structure is the same (the strings ...